/**
 * 基础路由
 * @type { *[] }
 */

import Layout from "../layout/Index.vue"; // 刚建的 Layout

const constantRouterMap = [
  {
    path: "/home",
    name: "home",
    meta: { title: "首页", icon: "House" },
    component: () => import("@/views/home/Index.vue"),
  },

  {
    path: "/system",
    name: "system",
    redirect: { name: "systemUser" }, // 默认跳到用户页
    meta: { title: "系统管理", icon: "Setting" },
    children: [
      {
        path: "/system/role",
        name: "systemRole",
        meta: { title: "角色管理" },
        component: () => import("@/views/system/role/Index.vue"),
      },
      {
        path: "/system/user",
        name: "systemUser",
        meta: { title: "用户管理" },
        component: () => import("@/views/system/user/Index.vue"),
      },
    ],
  },
];

export default constantRouterMap;
